<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="helloworld.modules.spring.SpringSecurityUtils" %>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<%@ include file="/common/meta.jsp"%>
	<link rel="stylesheet" type="text/css" href="${ctx}/resource/css/index.css" />
	<script type="text/javascript" src="${ctx}/resource/js/jquery-1.4.2.min.js"></script>
	<script type="text/javascript" src="${ctx}/resource/js/jquery.jclock.js"></script>
	<script type="text/javascript">
		$(function(){
			$('#clock').jclock({withDate:true, withWeek:true});
		});
	</script>
<title>Jerry,开心每一天！</title>
</head>

<body>
<div id="clock"></div>
<div id="header">
	<div id="logo"><img src="${ctx}/resource/images/logo.gif" /></div>
    <div id="topRight">
    	
    	<a class="exit" href="${ctx}/j_spring_security_logout"><%=SpringSecurityUtils.getCurrentUserName()%><img src="${ctx}/resource/images/exit.gif" />退出系统</a>
        <div class="guidence">
        	
        	<div class="guide"><a href="#">首页</a> >> <a href="#">通知公告</a> >> <a href="#">最近新闻</a></div>
            <div class="goto">
            	<a href="#"><img src="${ctx}/resource/images/back.gif" /></a>
            	<a href="#"><img src="${ctx}/resource/images/forward.gif" /></a>
            </div>
        </div>
    </div>
</div><!---the end of header-->
<div id="main">
	<div id="mainLeft">
		<iframe src="${ctx}/administrate/function!menu.action" frameborder="0" height="97%" width="180px"></iframe>
	</div><!---the end of mainLeft-->
    <div id="switch">
    	<a class="opened" href="#"></a>
    </div>
    <div id="mainRight" class="rightNar">
    	<iframe name="mainRight" frameborder="0" height="97%" width="100%"></iframe>
    </div><!---the end of mainRight-->
</div><!---the end of main-->
</body>
</html>
<script type="text/javascript">
	var h = (window.innerHeight || (window.document.documentElement.clientHeight || window.document.body.clientHeight));
  	$("#main").height(h-80);
  	$("#mainLeft").height(h-80-24);
  	window.onresize = resize;
  	function resize(){
    	var h = (window.innerHeight || (window.document.documentElement.clientHeight || window.document.body.clientHeight));
    	$("#main").height(h-80);
  		$("#mainLeft").height(h-80-24);
	}
	$(document).ready(function(){
		var left=$("#mainLeft");
		var right=$("#mainRight");
		var btn=$("#switch a");
		btn.addClass("opened");
		right.addClass("rightNar");
		btn.click(function(){
			if($(this).hasClass("opened")){
				$(this).removeClass("opened").addClass("closed");
				right.removeClass("rightNar").addClass("rightWide");
				left.hide();
			}
			else{				
				$(this).removeClass("closed").addClass("opened");
				right.removeClass("rightWide").addClass("rightNar");
				left.show();
			}
		})
	})
</script>